package com.example.mybatisplus01.controller;

import com.example.mybatisplus01.pojo.User;
import com.example.mybatisplus01.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class indexController {

    @Autowired
    UserService userService;
    @RequestMapping("/test")
    public List<User> getlist(){
        List<User> list = userService.list();
        return list;
    }

}
